package com.gopay.common.rcs.dao.transadmit.impl;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.rcs.transadmit.RcsTransAdmittanceConfCust;
import com.gopay.common.rcs.dao.transadmit.RcsTransAdmitConfDAO;

/**
 * 
 * @author lizheng
 *
 */
@Repository("rcsTransAdmitConfDAO")
public class RcsTransAdmittanceConfCustDAOImpl extends BaseDAOImpl<RcsTransAdmittanceConfCust, Serializable> implements RcsTransAdmitConfDAO {

	@Override
	public List<RcsTransAdmittanceConfCust> findByCustIdAndIntTxnCd(String custId, String intTxnCd) {
		DetachedCriteria detachedCriteria = DetachedCriteria.forClass(RcsTransAdmittanceConfCust.class);
		detachedCriteria.add(Restrictions.eq("custId", custId));
		detachedCriteria.add(Restrictions.eq("gopayIntTxnCd", intTxnCd));
		return findByCriteria(detachedCriteria);
	}

}
